const fp = require('fastify-plugin');
const ActionHelper = include('/plugins/utils/action_helper');
const scheduleJobs = include('/plugins/utils/schedule');
const constants = include('/plugins/utils/constants');

module.exports = fp(
  function(fastify, opts, next) {
    fastify.decorate('utils', {
      ActionHelper,
      scheduleJobs,
      constants,
    });
    next();
  },
  {
    fastify: '1.7.0',
    // decorators: {
    //   fastify: ['plugin1', 'plugin2'],
    //   reply: ['compress'],
    // },
    // dependencies: ['plugin1-name', 'plugin2-name'],
  }
);
